package com.zrwl.poscloud.xo.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zrwl.poscloud.base.entity.Dept;
import com.zrwl.poscloud.base.entity.Grade;
import com.zrwl.poscloud.base.superI.SuperMapper;
import com.zrwl.poscloud.xo.vo.GradeVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 班级 Mapper类
 *
 * @author 刘思童 AutoGenerate
 * @date 2023-02-27
 */
public interface GradeMapper extends SuperMapper<Grade> {
    /**
     * 获取分页数据
     * @param page 分页
     * @param gradeVO 参数
     * @return
     */
    IPage<GradeVO> getPageList(@Param("page") Page page, @Param("param") GradeVO gradeVO);

    /**
     * 根据名称获取班级
     *
     * @param companyCode
     * @param deptName
     * @return
     */
    Grade getGradeByName(@Param("companyCode") String companyCode, @Param("deptName") String deptName);
    Grade getGradeByDeptCode(@Param("companyCode") String companyCode);
    int updateLeaveByGradeUid(@Param("gradeUid") String gradeUid);
    Dept getDeptByUid(@Param("gradeUid") String gradeUid);

    List<GradeVO> getAllList(@Param("param") GradeVO gradeVO);
}
